<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>sprox_card_c.html</title>
<!-- Source : c:/temp/springprox_api/sprox_card.c -->
<!-- Doc generated on Thu Jun 24 12:26:30 2010 by johann on PC_DEV_5 -->
<!-- Generated with ROBODoc Version 4.99.8 (Specific build by PRO ACTIVE - Apr 13 2010) -->
<style type="text/css">
body
{
  background-color: #ffffff;
  color: #000000;
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  margin-left: 60px;
  margin-right: 40px;  
}
table
{
  border-collapse: collapse;
  border-style: solid;
  border-width: 1px;
  border-color: #000000;
  margin-bottom: 12px;
}
td
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  vertical-align: top;
  padding-right: 6px;
  border-style: solid;
  border-width: 1px;
  border-color: #dddddd; 
}
th
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  vertical-align: top;  
  padding-right: 6px;
  border-style: solid;
  border-width: 1px;
  border-color: #000000;
  background-color: #dddddd;  
}
h1
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 18pt;
  font-weight: bold;
  margin-bottom: 36px;
  color: #000000;
  margin-left: -40px;
}
h2
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 12pt;
  font-weight: bold;
  margin-top: 48px;
  margin-bottom: 24px;
  padding-top: 2px;
  padding-bottom: 2px;
  background-color: #dddddd;
  color: #000000;
  margin-left: -40px;
}
h3
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 11pt;
  font-weight: bold;
  margin-top: 36px;
  margin-bottom: 24px; 
  border-style: none;
  border-top-style: solid;  
  border-width: 1px;
  border-color: #cccccc; 
  margin-left: -40px;
}
h4
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 11pt;
  font-weight: bold;
  margin-top: 24px;
  margin-bottom: 12px;  
}
h5
{
  font-family: Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
  font-size: 9pt;
  font-weight: bold;
  margin-top: 12px;
  margin-bottom: 2px;  
}
a
{
  color: #0000ff;
}
p
{
  margin-top: 0px;
  margin-bottom: 6px;  
  width: 600px;
  text-align: justify;
}
ul
{
  margin-top: 0px;
  margin-bottom: 6px;  
  width: 600px;
  text-align: justify;
}
li
{
  margin-top: 0px;
  margin-bottom: 6px;  
  width: 550px;
  text-align: justify;
}
tt
{
  font-family: Courier, Courier New;
  font-size: 10pt;
}
pre
{
  background-color: #ffffff;
  color: #000000;
  font-size: 10pt;
}
.NAV
{
  font-size: 7pt;
}
a.NAV
{
  color: #0000cc;
}
.TOC
{
  font-size: 9pt;
  color: #888888;
}
a.TOC
{
  color: #0000ff;
}
.INDEX
{
  font-size: 9pt;
}
a.INDEX
{
  color: #0000ff;
}
.TYPE
{
  font-size: 7pt;
  color: #888888;
}
.ITEM
{
  font-weight: bold;
  color: #000088;
}
.LABEL
{
  color: #000088;
}
.HISTORY
{
  color: #006600;
}
.AUTHOR
{
  color: #006600;
}
.COPYRIGHT
{
  color: #006600;
}
.PORTABILITY
{
  color: #006600;
}
.WARNING
{
  color: #aa0000;
}

.bitinfo
{
  width: 60px;
  font-style: italic;
  text-align: center;
}

.bitnum
{
  text-align: center;
}

.bitname
{
  font-weight: bold;
  text-align: center;
}

.tabitem
{
  width: 100px;
}

.tabname
{
  width: 200px;
}

.tabdesc
{
  width: 450px;
}

.value
{
  font-family: courier;
  text-align: right;
}

.tabsepar
{
  border-top-style: solid;
  border-bottom-style: solid;
  border-width: 2px;
  border-color: #888888;
  font-style: italic;
  text-align: center;
}
</style>
</head>
<body bgcolor="#FFFFFF">
<a name="robo_top_of_doc"></a>
<h3 align="center">TABLE OF CONTENTS</h3>
<ul>
<li><a class="TOC" href="#robo11">Smartcards</a></li>
<li><a class="TOC" href="#robo35">SPROX_Card_Exchange</a></li>
<li><a class="TOC" href="#robo36">SPROX_Card_GetConfig</a></li>
<li><a class="TOC" href="#robo37">SPROX_Card_GetFirmware</a></li>
<li><a class="TOC" href="#robo38">SPROX_Card_PowerDown</a></li>
<li><a class="TOC" href="#robo39">SPROX_Card_PowerUp</a></li>
<li><a class="TOC" href="#robo40">SPROX_Card_PowerUp_Auto</a></li>
<li><a class="TOC" href="#robo41">SPROX_Card_PowerUp_Ex</a></li>
<li><a class="TOC" href="#robo42">SPROX_Card_SetConfig</a></li>
<li><a class="TOC" href="#robo43">SPROX_Card_Status</a></li>
</ul>
<h3>&nbsp;</h3>


<h1><a name="robo11"><span class="TYPE">[Modules]</span><a class="LABEL" name="Smartcards">
Smartcards</a></h1>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./modules.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <a class="LINK_1" href="./springprox_h.html#robo0">SpringProxAPI</a> :: Access to smartcard readers
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Access to SmartCard slot for CSB-5 and related products
   Those functions work only on readers featuring a GemPlus GemCore smartcard reader
</pre>
</span><p class="ITEM">NOTES</p>
<span class="NOTES"><pre class="NOTES">   Most parameters of the SPROX_Card_xxx functions are directly sent to reader's internal
   GemCore chipset.
   Please refer to GemPlus GemCore documentation for details regarding those functions.
</pre>
</span>


<h2><a name="robo35"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fExchange">
SPROX_Card_Exchange</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_Exchange</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Perform a T=0 or T=1 exchange according to ISO 7816-3
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   BYTE slot                : smarcard slot number
   const BYTE send_buffer[] : buffer to sens to the card
   WORD send_len            : length of send_buffer
   BYTE recv_buffer[]       : buffer for card's answer
   WORD *recv_len           : input  : size of recv_buffer 
                              output : actual length of reply
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   MI_OK              : success
   GemCore specific code if an error has occured ; please refer to
   relevant GemPlus documentation.
</pre>
</span><p class="ITEM">NOTES</p>
<span class="NOTES"><pre class="NOTES">   This functions accepts only short APDUs (Lc &lt;= 256, Le &lt;= 254)
   No interpretation of the SW is performed. In particular, a 61xx status word
   is returned to the caller "as it".
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo43">SPROX_Card_Status</a>
   <a class="LINK_37" href="#robo39">SPROX_Card_PowerUp</a>
</pre>
</span>


<h2><a name="robo36"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fGetConfig">
SPROX_Card_GetConfig</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_GetConfig</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   This function is deprecated and shall not be used
</pre>
</span>


<h2><a name="robo37"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fGetFirmware">
SPROX_Card_GetFirmware</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_GetFirmware</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Retrieve the SpringProx' internal GemCore version info
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   TCHAR firmware[]   : buffer to receive the firmware info
   WORD  len          : character-size of the buffer
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   MI_OK              : success
   GemCore specific code if an error has occured ; please refer to
   relevant GemPlus documentation.
</pre>
</span>


<h2><a name="robo38"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fPowerDown">
SPROX_Card_PowerDown</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_PowerDown</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Power down a smarcard
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   BYTE slot          : smartcard slot number
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   MI_OK              : success
   GemCore specific code if an error has occured ; please refer to
   relevant GemPlus documentation.
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo43">SPROX_Card_Status</a>
   <a class="LINK_37" href="#robo39">SPROX_Card_PowerUp</a>
</pre>
</span>


<h2><a name="robo39"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fPowerUp">
SPROX_Card_PowerUp</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_PowerUp</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Power up a T=0 or T=1 smartcard with default options
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   BYTE slot          : smartcard slot number
   BYTE unused        : shall be set to 0x00
   BYTE *atr          : buffer to retrieve card's ATR
   WORD *atr_len      : input  : size of atr
                        output : actual length of atr
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   MI_OK              : success
   GemCore specific code if an error has occured ; please refer to
   relevant GemPlus documentation.
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo43">SPROX_Card_Status</a>
   <a class="LINK_37" href="#robo42">SPROX_Card_SetConfig</a>
   <a class="LINK_37" href="#robo38">SPROX_Card_PowerDown</a>  
</pre>
</span>


<h2><a name="robo40"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fPowerUp5fAuto">
SPROX_Card_PowerUp_Auto</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_PowerUp_Auto</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   This function is deprecated and shall not be used
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo39">SPROX_Card_PowerUp</a>
</pre>
</span>


<h2><a name="robo41"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fPowerUp5fEx">
SPROX_Card_PowerUp_Ex</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_PowerUp_Ex</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Power up a T=0 or T=1 smartcard with user-supplied options
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   BYTE slot            : smartcard slot number
   BYTE options         : power-up options
   BYTE atr[]           : buffer to retrieve card's ATR
   WORD *atr_len        : input  : max size of ATR
                          output : actual size of ATR
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   MI_OK              : success
   GemCore specific code if an error has occured ; please refer to
   relevant GemPlus documentation.
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo43">SPROX_Card_Status</a>
   <a class="LINK_37" href="#robo42">SPROX_Card_SetConfig</a>
   <a class="LINK_37" href="#robo38">SPROX_Card_PowerDown</a>  
</pre>
</span>


<h2><a name="robo42"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fSetConfig">
SPROX_Card_SetConfig</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_SetConfig</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   This function is deprecated and shall not be used
</pre>
</span>


<h2><a name="robo43"><span class="TYPE">[Functions]</span><a class="LABEL" name="SPROX5fCard5fStatus">
SPROX_Card_Status</a></h2>

<p class="NAV">[<a class="NAV" href="#robo_top_of_doc">top</a>][<a class="NAV" href="./Copie de springprox_h.html#robo1">parent</a>][<a class="NAV" href="./functions.html#top">index</a>]</p>
<p class="ITEM">NAME</p>
<span class="NAME"><pre class="NAME">   <strong>SPROX_Card_Status</strong>
</pre>
</span><p class="ITEM">DESCRIPTION</p>
<span class="DESCRIPTION"><pre class="DESCRIPTION">   Retrieve status of a smartcard reader slot, or of the smartcard itself
</pre>
</span><p class="ITEM">INPUTS</p>
<span class="INPUTS"><pre class="INPUTS">   BYTE slot          : smarcard slot number
   BYTE *stat         : on correct execution, this byte provides the
                        status of the slot :
                          xxxxx0xx : card not inserted
                          xxxxx1xx : card inserted but not powered
                                     (note : this bit is always set on SIM/SAM
                                      slots - do not trust it !)
                          xxxxx110 : card inserted and powered (5V)
                          xxxxx111 : card inserted and powered (3V)
                          xxxx011x : T=0 protocol
                          xxxx111x : T=1 protocol
   BYTE *type         : on correct execution, this byte provides the
                        activated card type (see <a class="LINK_12" href="#robo42">SPROX_Card_SetConfig</a>)
   BYTE config[4]     : on correct execution, this buffer provides card's
                        communication parameters :
                        - for a T=0 card 
                          config[0] : TA1 (FI &amp; DI)
                          config[1] : TC1 (EGT)
                          config[2] : WI
                          config[3] : 0x00
                        - for a T=1 card 
                          config[0] : TA1 (FI &amp; DI)
                          config[1] : TC1 (EGT)
                          config[2] : IFSC
                          config[3] : TB3 (BWI &amp; CWI)
</pre>
</span><p class="ITEM">RETURNS</p>
<span class="RETURNS"><pre class="RETURNS">   MI_OK              : success
   -214               : smartcard slot is not wired
   -216               : smartcard slot does not exists
   GemCore specific code if an error has occured ; please refer to
   relevant GemPlus documentation.
</pre>
</span><p class="ITEM">SEE ALSO</p>
<span class="SEE_ALSO"><pre class="SEE ALSO">   <a class="LINK_37" href="#robo42">SPROX_Card_SetConfig</a>
   <a class="LINK_37" href="#robo36">SPROX_Card_GetConfig</a>
</pre>
</span>
<hr />
Generated from <b>sprox_card.c</b> on Thu Jun 24 12:26:30 2010<br />
</body>
</html>
